package cn.waka.sys.admin.config;

import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.annotation.TypeAlias;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@Configuration
@MapperScan("cn.waka.sys.admin")
@TypeAlias("")
@EnableTransactionManagement
public class JdbcConfig {
    final Logger log = LoggerFactory.getLogger(JdbcConfig.class);

	/*@Bean
	@RefreshScope
	public static DataSource dataSource(JdbcConfig config) throws SQLException {
		return new HikariDataSource(config);
	}
	
	
	
	@Bean
	@RefreshScope
	public static DataSourceTransactionManager transactionManager(DataSource dataSource){
		DataSourceTransactionManager dataSourceTransactionManager = new DataSourceTransactionManager(dataSource);
		dataSourceTransactionManager.setRollbackOnCommitFailure(true);
		
		return dataSourceTransactionManager;
	}
	*/


}